package lab02.test21;

public class Test {
    public static void main(String[] args) {
        char a='0';
        String string="1223655885541";
        System.out.println(getCharCount(a,string));
    }

    public static int getCharCount(char a,String string) {
        int count=0;
        for(int i=0;i<string.length();i++){
            char temp=string.charAt(i);
            if(a==temp)
                count++;
        }
        return  count;


    }
}
